import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 在elementUI之后，导出自己的样式
import '@/assets/global.less'

import VueQuillEditor from 'vue-quill-editor'

// require styles
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

// 导入dayjs
import dayjs from 'dayjs'
// 定义全局的过滤器函数
// Vue.filter('过滤器名', fn)
Vue.filter('dtformat', dt => {
  // dt 表示原本要输出的那个值。即 Wed Jan 19 2022 18:39:40 GMT+0800 (China Standard Time)
  return dayjs(dt).format('YYYY-MM-DD HH:mm:ss')
})

Vue.use(VueQuillEditor /* { default global options } */)

Vue.use(ElementUI)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
